""" 
oled显示屏

"""

from machine import Pin
import time
from machine import SoftI2C
from ssd1306 import SSD1306_I2C

i2c = SoftI2C(scl=Pin(18), sda=Pin(23))
oled = SSD1306_I2C(128, 64, i2c)

if __name__ == "__main__":
    oled.fill(0)  # 清屏
    oled.show()  # 显示

    oled.text("Hello world", 0, 0, 1)  # 显示文本
    oled.show()

    time.sleep(5)
    oled.fill(0)  # 清屏
    oled.show()  # 显示